package com.sale.system.dubbo;

import com.sale.system.api.RemoteAccountManagementService;
import com.sale.system.api.domain.SysBalance;
import com.sale.system.service.ISysAccountManagementService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 账户管理
 */

@RequiredArgsConstructor
@DubboService
@Service
public class RemoteAccountManagementServiceImpl implements RemoteAccountManagementService {

    private final ISysAccountManagementService sysAccountManagementService;

    /**
     * 修改账户当前余额
     */
    @Override
    public int editBalance(SysBalance sys) {
        int i = sysAccountManagementService.editBalance(sys);
        return i;
    }

    /**
     * 循环修改账户当前余额
     */
    @Override
    public int editListBalance(List<SysBalance> list1) {
        return sysAccountManagementService.editListBalance(list1);
    }

    /**
     * 循环修改账户当前余额 -
     */
    @Override
    public int editListBalance2(List<SysBalance> list1) {
        return sysAccountManagementService.editListBalance2(list1);
    }

    /**
     * 修改账户当前余额 -
     */
    @Override
    public int editBalance2(SysBalance sys) {
        return sysAccountManagementService.editBalance2(sys);
    }
}
